home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIUnicharOutputStream.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  154 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIUnicharOutputStream.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIUnicharOutputStream_h__
  6. #define __gen_nsIUnicharOutputStream_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIUnicharOutputStream */
  19. #define NS_IUNICHAROUTPUTSTREAM_IID_STR "2d00b1bb-8b21-4a63-bcc6-7213f513ac2e"
  20.  
  21. #define NS_IUNICHAROUTPUTSTREAM_IID \
  22.   {0x2d00b1bb, 0x8b21, 0x4a63, \
  23.     { 0xbc, 0xc6, 0x72, 0x13, 0xf5, 0x13, 0xac, 0x2e }}
  24.  
  25. /**
  26.  * An interface that allows writing unicode data.
  27.  */
  28. class NS_NO_VTABLE nsIUnicharOutputStream : public nsISupports {
  29.  public: 
  30.  
  31.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUNICHAROUTPUTSTREAM_IID)
  32.  
  33.   /**
  34.      * Write a single character to the stream. When writing many characters,
  35.      * prefer the string-taking write method.
  36.      *
  37.      * @retval true The character was written successfully
  38.      * @retval false Not all bytes of the character could be written.
  39.      */
  40.   /* boolean write (in unsigned long aCount, [array, size_is (aCount), const] in PRUnichar c); */
  41.   NS_IMETHOD Write(PRUint32 aCount, const PRUnichar *c, PRBool *_retval) = 0;
  42.  
  43.   /**
  44.      * Write a string to the stream.
  45.      *
  46.      * @retval true The string was written successfully
  47.      * @retval false Not all bytes of the string could be written.
  48.      */
  49.   /* boolean writeString (in AString str); */
  50.   NS_IMETHOD WriteString(const nsAString & str, PRBool *_retval) = 0;
  51.  
  52.   /**
  53.      * Flush the stream. This finishes the conversion and writes any bytes that
  54.      * finish the current byte sequence.
  55.      *
  56.      * It does NOT flush the underlying stream.
  57.      *
  58.      * @see nsIUnicodeEncoder::Finish
  59.      */
  60.   /* void flush (); */
  61.   NS_IMETHOD Flush(void) = 0;
  62.  
  63.   /**
  64.      * Close the stream and free associated resources. This also closes the
  65.      * underlying stream.
  66.      */
  67.   /* void close (); */
  68.   NS_IMETHOD Close(void) = 0;
  69.  
  70. };
  71.  
  72. /* Use this macro when declaring classes that implement this interface. */
  73. #define NS_DECL_NSIUNICHAROUTPUTSTREAM \
  74.   NS_IMETHOD Write(PRUint32 aCount, const PRUnichar *c, PRBool *_retval); \
  75.   NS_IMETHOD WriteString(const nsAString & str, PRBool *_retval); \
  76.   NS_IMETHOD Flush(void); \
  77.   NS_IMETHOD Close(void); 
  78.  
  79. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  80. #define NS_FORWARD_NSIUNICHAROUTPUTSTREAM(_to) \
  81.   NS_IMETHOD Write(PRUint32 aCount, const PRUnichar *c, PRBool *_retval) { return _to Write(aCount, c, _retval); } \
  82.   NS_IMETHOD WriteString(const nsAString & str, PRBool *_retval) { return _to WriteString(str, _retval); } \
  83.   NS_IMETHOD Flush(void) { return _to Flush(); } \
  84.   NS_IMETHOD Close(void) { return _to Close(); } 
  85.  
  86. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  87. #define NS_FORWARD_SAFE_NSIUNICHAROUTPUTSTREAM(_to) \
  88.   NS_IMETHOD Write(PRUint32 aCount, const PRUnichar *c, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Write(aCount, c, _retval); } \
  89.   NS_IMETHOD WriteString(const nsAString & str, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteString(str, _retval); } \
  90.   NS_IMETHOD Flush(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Flush(); } \
  91.   NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } 
  92.  
  93. #if 0
  94. /* Use the code below as a template for the implementation class for this interface. */
  95.  
  96. /* Header file */
  97. class nsUnicharOutputStream : public nsIUnicharOutputStream
  98. {
  99. public:
  100.   NS_DECL_ISUPPORTS
  101.   NS_DECL_NSIUNICHAROUTPUTSTREAM
  102.  
  103.   nsUnicharOutputStream();
  104.  
  105. private:
  106.   ~nsUnicharOutputStream();
  107.  
  108. protected:
  109.   /* additional members */
  110. };
  111.  
  112. /* Implementation file */
  113. NS_IMPL_ISUPPORTS1(nsUnicharOutputStream, nsIUnicharOutputStream)
  114.  
  115. nsUnicharOutputStream::nsUnicharOutputStream()
  116. {
  117.   /* member initializers and constructor code */
  118. }
  119.  
  120. nsUnicharOutputStream::~nsUnicharOutputStream()
  121. {
  122.   /* destructor code */
  123. }
  124.  
  125. /* boolean write (in unsigned long aCount, [array, size_is (aCount), const] in PRUnichar c); */
  126. NS_IMETHODIMP nsUnicharOutputStream::Write(PRUint32 aCount, const PRUnichar *c, PRBool *_retval)
  127. {
  128.     return NS_ERROR_NOT_IMPLEMENTED;
  129. }
  130.  
  131. /* boolean writeString (in AString str); */
  132. NS_IMETHODIMP nsUnicharOutputStream::WriteString(const nsAString & str, PRBool *_retval)
  133. {
  134.     return NS_ERROR_NOT_IMPLEMENTED;
  135. }
  136.  
  137. /* void flush (); */
  138. NS_IMETHODIMP nsUnicharOutputStream::Flush()
  139. {
  140.     return NS_ERROR_NOT_IMPLEMENTED;
  141. }
  142.  
  143. /* void close (); */
  144. NS_IMETHODIMP nsUnicharOutputStream::Close()
  145. {
  146.     return NS_ERROR_NOT_IMPLEMENTED;
  147. }
  148.  
  149. /* End of implementation class template. */
  150. #endif
  151.  
  152.  
  153. #endif /* __gen_nsIUnicharOutputStream_h__ */
  154.